<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <div id="app">
      <maoyan></maoyan>
    </div>

    <script src="../../Vue.js"></script>
    <script>
      const MaoyanHeader = {
        template: `
          <header>猫眼头部</header>
        `,
      };
      const MaoyanBody = {
        template: `
          <header>猫眼内容</header>
        `,
      };

      const Maoyan = {
        template: `
          <div>
            <maoyan-header></maoyan-header>
            <maoyan-body></maoyan-body>
          </div>
        `,
        components: {
          MaoyanHeader,
          MaoyanBody,
        },
      };

      new Vue({
        el: "#app",
        data: {},
        // 注册组件
        components: {
          Maoyan,
        },
      });
    </script>
  </body>
</html>
